
package gui;

import java.awt.BorderLayout;
import java.awt.Button;
import java.awt.Color;
import java.awt.FlowLayout;
import java.awt.Frame;
import java.awt.GridLayout;

public class UsandoGridLayout {
    
    public static void main(String args[]){
        Frame janela = new Frame();
        janela.setTitle("Título da Janela");
        
        janela.setLayout(new GridLayout(2,3));
        janela.setSize(640, 480);
        
        Button bt1 = new Button("bt 1");
        Button bt2 = new Button("bt 2");
        Button bt3 = new Button("bt 3");
        Button bt4 = new Button("bt 4");
        Button bt5 = new Button("bt 5");
        Button bt6 = new Button("bt 6");
        
        janela.add(bt1);
        janela.add(bt2);
        janela.add(bt3);
        janela.add(bt4);
        janela.add(bt5);
        janela.add(bt6);
        janela.setVisible(true);
    }
    
}
